﻿function PlugIn_getDocinfo()
{
	var i;
	var info="本文档统计信息:\n";
	var m=getImagesURL().split("|");
	var s=getFlashsURL().split("|")
	var a=getAttachFilesURL().split("|");

	info+="图片数量为"+m.length+" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n";
	for(i=0;i<m.length;i++)
	{
		info+="\t"+(i+1).toString()+")"+m[i]+"\n";
	}
	info+="Flash数量为"+s.length+" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n";
	for(i=0;i<s.length;i++)
	{
		info+="\t"+(i+1).toString()+")"+s[i]+"\n";
	}
	info+="附件数量为"+a.length+" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n";
	for(i=0;i<a.length;i++)
	{
		info+="\t"+(i+1).toString()+")"+a[i]+"\n";
	}
	info=info+m;
	alert(info);
}
/*
REM =====WebNote_EX_WordFunc.vbs=====
REM =========字数统计=============
Sub DocInfo_WordLength()
	dim msg,tempStr,ENWordLength,CNWordLength,WordLength
	tempStr=getInnerText()
	ENWordLength=Sum_ENWord(tempStr)
	CNWordLength=Sum_CNWord(tempStr)
	WordLength=ENWordLength+CNWordLength
	
	msg="<p><b>统计信息：</b>-------------------------------------</p>"&_
		"<table border='0' width='100%' cellspacing='3' cellpadding='0'>"&_
	  "<tr>"&_
	    "<td>字数：</td>"&_
	    "<td width='30' align='right'>"&WordLength&"</td>"&_
	  "</tr>"&_
	  "<tr>"&_
	    "<td style='padding-left: 10'>非中文单词</td>"&_
	    "<td width='30' align='right'>"&ENWordLength&"</td>"&_
	  "</tr>"&_
	  "<tr>"&_
	    "<td style='padding-left: 10'>中文字符</td>"&_
	    "<td width='30' align='right'>"&CNWordLength&"</td>"&_
	  "</tr>"&_
	  "<tr>"&_
	    "<td>字符数（不计空格）</td>"&_
	    "<td width='30' align='right'>"&Sum_Letter_NotNull(tempStr)&"</td>"&_
	  "</tr>"&_
	  "<tr>"&_
	    "<td>字符数（计空格）</td>"&_
	    "<td width='30' align='right'>"&Sum_Letter_All(tempStr)&"</td>"&_
	  "</tr>"&_
	"</table>"
	Call mmMsgbox(msg,"BtnOK")
End Sub

Function Sum_ENWord(byVal sText)
	'统计英文单词个数
	dim Pos,tempWord,LenCounter,Length,i
	Pos=0
	LenCounter=0
	Length=Len(sText)
	For i=1 to Length
		tempWord=Asc(Mid(sText,i,1))
		if (tempWord>=97 and tempWord<=122) or (tempWord>=65 and tempWord<=90) then
			if i=Length then
				LenCounter=LenCounter+1
				Exit For
			end if
			For Pos=i to Length
				tempWord=Asc(Mid(sText,Pos,1))
				if Not ((tempWord>=97 and tempWord<=122) or (tempWord>=65 and tempWord<=90)) then
					LenCounter=LenCounter+1
					i=Pos
					Exit For
				end if
			Next
		end if
	Next
	if LenCounter>0 then
		Sum_ENWord=LenCounter
	else
		Sum_ENWord=0
	end if
End Function

Function Sum_CNWord(byVal sText)
	'统计中文字数
	dim i,tempWord,LenCounter
	LenCounter=0
	For i=1 to Len(sText)
		tempWord=Mid(sText,i,1)
		if Asc(tempWord)<0 then
			LenCounter=LenCounter+1
		end if
	Next
	Sum_CNWord=LenCounter
End Function

Function Sum_Letter_All(byVal sText)
	'统计所有字符总数（包括空格）
	sText=Replace(sText,vbcrlf,"")
	Sum_Letter_All=Len(sText)
End Function

Function Sum_Letter_NotNull(byVal sText)
	'统计所有字符总数（不包括空格）
	sText=Replace(sText,vbcrlf,"")
	sText=Replace(sText," ","")
	Sum_Letter_NotNull=Len(sText)
End Function
*/

